-- GENERATED SPELL FOR [Unliving Resident] --


function spell0_12380(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(11978,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12380', 6303, 1)
end

function spell1_12380(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12380', 30270, 1)
end

function Sorts_12380(pUnit, Event)
local choix_sorts_12380 = math.random(0, 1)
if choix_sorts_12380 == 0 then
pUnit:RegisterEvent('spell0_12380', 1, 1)
end
if choix_sorts_12380 == 1 then
pUnit:RegisterEvent('spell1_12380', 1, 1)
end
end

function mob12380_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12380', math.random(1500, 3000), 1)
end

function mob12380_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12380_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12380_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12380, 1, 'mob12380_Action')
RegisterUnitEvent(12380, 2, 'mob12380_Leave')
RegisterUnitEvent(12380, 3, 'mob12380_Kill')
RegisterUnitEvent(12380, 4, 'mob12380_Die')
